using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Export XML Workspace Document</para>
    /// <para>Creates a readable XML document of the geodatabase contents.</para>
    /// <para>创建地理数据库内容的可读 XML 文档。</para>
    /// </summary>    
    [DisplayName("Export XML Workspace Document")]
    public class ExportXMLWorkspaceDocument : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportXMLWorkspaceDocument()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_data">
        /// <para>Input Data</para>
        /// <para>The input datasets to be exported and represented in an XML workspace document. The input data can be a geodatabase, feature dataset, feature class, table, raster, or raster catalog. If there are multiple inputs, the inputs must be from the same workspace. Multiple input workspaces are not supported.</para>
        /// <para>要导出并在 XML 工作区文档中表示的输入数据集。输入数据可以是地理数据库、要素数据集、要素类、表、栅格或栅格目录。如果有多个输入，则输入必须来自同一工作区。不支持多个输入工作区。</para>
        /// </param>
        /// <param name="_out_file">
        /// <para>Output File</para>
        /// <para>The XML workspace document file to be created. This can be an XML file (.xml) or a compressed ZIP file (.zip or .z).</para>
        /// <para>要创建的 XML 工作区文档文件。这可以是 XML 文件 （.xml） 或压缩的 ZIP 文件（.zip 或 .z）。</para>
        /// </param>
        public ExportXMLWorkspaceDocument(List<object> _in_data, object _out_file)
        {
            this._in_data = _in_data;
            this._out_file = _out_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Export XML Workspace Document";

        public override string CallName => "management.ExportXMLWorkspaceDocument";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_data, _out_file, _export_type.GetGPValue(), _storage_type.GetGPValue(), _export_metadata.GetGPValue()];

        /// <summary>
        /// <para>Input Data</para>
        /// <para>The input datasets to be exported and represented in an XML workspace document. The input data can be a geodatabase, feature dataset, feature class, table, raster, or raster catalog. If there are multiple inputs, the inputs must be from the same workspace. Multiple input workspaces are not supported.</para>
        /// <para>要导出并在 XML 工作区文档中表示的输入数据集。输入数据可以是地理数据库、要素数据集、要素类、表、栅格或栅格目录。如果有多个输入，则输入必须来自同一工作区。不支持多个输入工作区。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_data { get; set; }


        /// <summary>
        /// <para>Output File</para>
        /// <para>The XML workspace document file to be created. This can be an XML file (.xml) or a compressed ZIP file (.zip or .z).</para>
        /// <para>要创建的 XML 工作区文档文件。这可以是 XML 文件 （.xml） 或压缩的 ZIP 文件（.zip 或 .z）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_file { get; set; }


        /// <summary>
        /// <para>Export Options</para>
        /// <para><xdoc>
        ///   <para>Determines if the output XML workspace document will contain all of the data from the input (table and feature class records, including geometry) or only the schema.</para>
        ///   <bulletList>
        ///     <bullet_item>Data—Export both the schema and the data. This is the default.</bullet_item><para/>
        ///     <bullet_item>Schema only—Export the schema only.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定输出 XML 工作空间文档是包含输入中的所有数据（表和要素类记录，包括几何）还是仅包含方案。</para>
        ///   <bulletList>
        ///     <bullet_item>数据 - 导出方案和数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>仅方案 （Schema only） - 仅导出方案。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Export Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _export_type_value _export_type { get; set; } = _export_type_value._DATA;

        public enum _export_type_value
        {
            /// <summary>
            /// <para>Data</para>
            /// <para>Data—Export both the schema and the data. This is the default.</para>
            /// <para>数据 - 导出方案和数据。这是默认设置。</para>
            /// </summary>
            [Description("Data")]
            [GPEnumValue("DATA")]
            _DATA,

            /// <summary>
            /// <para>Schema only</para>
            /// <para>Schema only—Export the schema only.</para>
            /// <para>仅方案 （Schema only） - 仅导出方案。</para>
            /// </summary>
            [Description("Schema only")]
            [GPEnumValue("SCHEMA_ONLY")]
            _SCHEMA_ONLY,

        }

        /// <summary>
        /// <para>Storage Type</para>
        /// <para><xdoc>
        ///   <para>Determines how feature geometry is stored when data is exported from a feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Binary—The geometry will be stored in a compressed base64 binary format. This binary format will produce a smaller XML workspace document. Use this option when the XML workspace document will be read by a custom program that uses ArcObjects. This is the default.</bullet_item><para/>
        ///     <bullet_item>Normalized—The geometry will be stored in an uncompressed format, resulting in a larger file. Use this option when the XML workspace document will be read by a custom program that does not use ArcObjects.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定从要素类导出数据时要素几何的存储方式。</para>
        ///   <bulletList>
        ///     <bullet_item>二进制 - 几何将以压缩的 base64 二进制格式存储。此二进制格式将生成较小的 XML 工作区文档。当使用 ArcObjects 的自定义程序将读取 XML 工作空间文档时，请使用此选项。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>归一化 - 几何将以未压缩格式存储，从而生成更大的文件。当不使用 ArcObjects 的自定义程序将读取 XML 工作空间文档时，请使用此选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Storage Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _storage_type_value _storage_type { get; set; } = _storage_type_value._BINARY;

        public enum _storage_type_value
        {
            /// <summary>
            /// <para>Binary</para>
            /// <para>Binary—The geometry will be stored in a compressed base64 binary format. This binary format will produce a smaller XML workspace document. Use this option when the XML workspace document will be read by a custom program that uses ArcObjects. This is the default.</para>
            /// <para>二进制 - 几何将以压缩的 base64 二进制格式存储。此二进制格式将生成较小的 XML 工作区文档。当使用 ArcObjects 的自定义程序将读取 XML 工作空间文档时，请使用此选项。这是默认设置。</para>
            /// </summary>
            [Description("Binary")]
            [GPEnumValue("BINARY")]
            _BINARY,

            /// <summary>
            /// <para>Normalized</para>
            /// <para>Normalized—The geometry will be stored in an uncompressed format, resulting in a larger file. Use this option when the XML workspace document will be read by a custom program that does not use ArcObjects.</para>
            /// <para>归一化 - 几何将以未压缩格式存储，从而生成更大的文件。当不使用 ArcObjects 的自定义程序将读取 XML 工作空间文档时，请使用此选项。</para>
            /// </summary>
            [Description("Normalized")]
            [GPEnumValue("NORMALIZED")]
            _NORMALIZED,

        }

        /// <summary>
        /// <para>Export Metadata</para>
        /// <para><xdoc>
        ///   <para>Determines if metadata will be exported.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—No metadata is exported.</bullet_item><para/>
        ///     <bullet_item>Checked—If the input contains metadata, it will be exported. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否导出元数据。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不导出元数据。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果输入包含元数据，则将输出元数据。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Export Metadata")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _export_metadata_value _export_metadata { get; set; } = _export_metadata_value._true;

        public enum _export_metadata_value
        {
            /// <summary>
            /// <para>METADATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("METADATA")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_METADATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_METADATA")]
            [GPEnumValue("false")]
            _false,

        }

        public ExportXMLWorkspaceDocument SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}